<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta charset="UTF-8">
		<script type="text/javascript" src="${pageContext.request.contextPath}/My97DatePicker/WdatePicker.js"></script>
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/css/base.css">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/css/style.css">
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-2.1.4.min.js"></script>
		<title>财务管理-账户信息</title>
	</head>
	<body>
		<div class="page">
			<div class="header">
				<div class="header_top"></div>
				<div class="header_bottom clearfix">
					<div class="header_logo fl">
						<img src="${pageContext.request.contextPath}/images/images/index-logo.png">
					</div>
					<ul class="header_nav clearfix fl">
						<li>
							<a href="${pageContext.request.contextPath}/morder/waitOrderList.html" >订单管理</a>
						</li>
						<li>
							<a href="${pageContext.request.contextPath}/staff/queryAllList/1.html">家政人员管理</a>
						</li>
						<li>
							<a href="${pageContext.request.contextPath}/supplier/account.html" class="on">财务管理</a>
						</li>
						<li>
							<a href="${pageContext.request.contextPath}/admin/accountInfo.html" >账户管理</a>
						</li>
					</ul>
					<div class="header_user fr">
						<img src="${pageContext.request.contextPath}/images/images/user.png">欢迎您，<i>${ sessionScope.MANAGER_NAME} </i><a href="${pageContext.request.contextPath}/manager/loginout.html">【切换账号】</a>
					</div>
				</div>
			</div>
			<div class="main clearfix">
				<div class="main_menu fl">
					<div class="menu_name on">
						<a href="${pageContext.request.contextPath}/supplier/account.html">
							<img src="${pageContext.request.contextPath}/images/images/zhxx.png">
							<p>账户信息</p>
						</a>
					</div>
					<%-- <div class="menu_name">
						<a href="${pageContext.request.contextPath}/supplier/exAndReInfo.html">
							<img src="${pageContext.request.contextPath}/images/images/szmx.png">
							<p>收支明细</p>
						</a>
					</div> --%>
					<div class="menu_name">
						<a href="${pageContext.request.contextPath}/supplier/withDrawInfo/1.html">
							<img src="${pageContext.request.contextPath}/images/images/txmx.png">
							<p>提现明细</p>
						</a>
					</div>
					<div class="menu_name ">
						<a href="${pageContext.request.contextPath}/supplier/smsInfo/1.html">
							<img src="${pageContext.request.contextPath}/images/images/dxgl.png">
							<p>短信管理</p>
						</a>
					</div>
					<div class="menu_name">
						<a href="${pageContext.request.contextPath}/supplier/heiInfo/1.html">
							<img src="${pageContext.request.contextPath}/images/images/hbgl.png">
							<p>嘿币管理</p>
						</a>
					</div>
		
				</div>
				<div class="main_cont fl">
					<div class="main_cont_top">
						<div class="main_inner clearfix">
							<div class="cont_top_title fl">当前位置：财务管理 > 账户信息</div>
							<div class="cont_top_time fr"><i><img src="${pageContext.request.contextPath}/images/images/refresh.png">
							<a href="${pageContext.request.contextPath}/supplier/account.html">刷新</a>
							</i></div>
						</div>
					</div>
					<div class="main_cont_bottom_duanxin">
						<div class="zhanghuxx">
							<h3>账户信息</h3>
							<ul>
								<li>账户余额      ：<span>人民币：${SUPPLIER_ACCOUNT.wABalance}元</span></li>
								<li>可提现金额   ：<span>人民币：${SUPPLIER_ACCOUNT.wABalance}元</span></li>
								<li>最近提现金额：<span>人民币：${SUPPLIER_ACCOUNT.wALastWithdraw}元</span></li>
								<li>最近提现时间：<span><fmt:formatDate value="${SUPPLIER_ACCOUNT.wALastWithdrawDate}" type="BOTH" dateStyle="full"/></span></li>
								<li>最近结算金额：<span>人民币：${SUPPLIER_ACCOUNT.wALastSave}元</span></li>
								<li>最近结算时间：<span><fmt:formatDate value="${SUPPLIER_ACCOUNT.wALastSaveDate}" type="BOTH" dateStyle="full"/></span></li>
							</ul>
						</div>
					</div>
				</div>
			</div>
			<!--申请提现-->
			<div class="mask_sqtx">
				<div class="application">
					<img src="${pageContext.request.contextPath}/images/images/close_bai.png" class="close">
					<h3>账户提现</h3>
					<div class="application_main">
						<form action="${pageContext.request.contextPath}/supplier/pay.html" method="post" class="form form-horizontal" id="withDrawForm">
						<div class="application_list"><span><i>*</i>提现金额：</span><input type="text" class="mr25" id="wPAmount" name="wPAmount" datatype="*1-20" nullmsg="金额不能为空">【可提现金额：<span>${SUPPLIER_ACCOUNT.wABalance}元</span>】</div>
						<div class="application_list clearfix">
							<span class="tc fl">手续费：</span>
							<div class="sxf fl">
								<p><span id="wfee"></span>元</p>
								<p>提现每次收取提现金额0.6%的手续费，从账户余额中扣除</p>
								<p>打款不论成功与否，均不予退还手续费，请知悉！</p>
							</div>
						</div>
						<div class="application_list clearfix">
							<span class="fl"><i>*</i>银行名称：</span>
							<div class="bank fl">
							<input type="text" class="input-text" placeholder="" name="wPBankName" id="wPBankName" datatype="*2-20" nullmsg="银行名称不能为空">	
							</div>
						</div>
						<div class="application_list"><span><i>*</i>开户行名称：</span><input type="text" name="wPBankDiopsit" id="wPBankDiopsit" datatype="*2-20" nullmsg="开户行名称不能为空"></div>
						<div class="application_list"><span><i>*</i>银行账号：</span><input type="text" name="wPBankNo" id="wPBankNo" datatype="*" nullmsg="银行账号不能为空"></div>
						<div class="application_list"><span><i>*</i>持卡人姓名：</span><input type="text" name="wPAccountName" id="wPAccountName" datatype="*2-20" nullmsg="账户名称不能为空"></div>
						<div class="application_list"><span><i>*</i>联系人电话：</span><input type="tel" pattern="[0-9]*" placeholder="请输入手机号码" id="mobile" name="wMMobile"  maxlength="11"><a id="sendCode">获取验证码</a></div>
						<div class="application_list"><span class="tc"><i>*</i>验证码：</span><input type="text" pattern="[0-9]*" id="smsCode" placeholder="请输入验证码"></div>
						<div class="application_list clearfix"><span class="tc fl" style="line-height: 92px;">补充说明：</span><textarea id="wPDesc"></textarea></div>
						<div class="application_list" style=" display:none;" id="tip"> <span id="tipMsg"></span> </div>
						<input type="hidden" name="wSType" value="1">
					<button class="baocun" id="btn_sub" type="button">提交</button>
					</form>
					</div>
					
				</div>
			</div>
		</div>
		<link href="${pageContext.request.contextPath}/css/H-ui.min.css" rel="stylesheet" type="text/css" />
		<link href="${pageContext.request.contextPath}/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
		<link href="${pageContext.request.contextPath}/lib/Hui-iconfont/1.0.7/iconfont.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="${pageContext.request.contextPath}/lib/jquery/1.9.1/jquery.min.js"></script> 
		<script type="text/javascript" src="${pageContext.request.contextPath}/lib/layer/2.1/layer.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/lib/laypage/1.2/laypage.js"></script>
		<script>
			$(function(){
				$(".gzjs").on("click",function(){
					$(".mask_sqtx").show()
				})
				$(".close").on("click",function(){
					$(".mask_sqtx").hide()
				})
				
				$('#sendCode').click(function() {
			    	var is = true;
			    	var mobile = $("#mobile").val();
			    	if(mobile == '' || mobile.length < 10 || isNaN(mobile)) {
			    		$("#tip").show();
			  	   		$("#tipMsg").text("请输入手机号码");
			 		  	is = false; 
			 	   	}
			    	
			    	var mobile = $("#mobile").val();
			    	
			    	if(is) {
				   		$.ajax({
				               type: "GET",
				               url: "${pageContext.request.contextPath}/members/getCode/" + mobile + ".json",
				               dataType: "json",
				               success: function(data){
				            	   if(data == 1) {
			                       	alert("短信已经发送请注意查收！");
			                       } 
				               }
				           });
			    	}
			    });
				 
				$("#btn_sub").click(function(){
				 	var mobile = $("#mobile").val();
			     	var smsCode = $('#smsCode').val();
			     	
			 	    var is = false;
			 		
			 	   	if(mobile == '' || mobile.length < 10 || isNaN(mobile)) {
			 	   	$("#tip").show();
				   		$("#tipMsg").text("请输入手机号码");
			 		  	is = false; 
			 	   	}
			 	   
				    if(smsCode == '' || smsCode.length < 6) {
				    	$("#tip").show();
				   		$("#tipMsg").text("请输入短信验证码"); 
					  	is = false; 
				   	}
				   if(smsCode != "") {
			     		$.ajax({
				               type: "GET",
				               url: "${pageContext.request.contextPath}/members/vaidateMobile/" + mobile + "/" + smsCode +".json",
				               dataType: "json",
				               success: function(data){
				                        if(data == 0) {
				                        	alert("验证码错误或者已经过期！", "警告对话框");
				                        	is=false;
				                        }if(data==1) {
				                        	$("#withDrawForm").submit();
				                        }
				               }
				           });
			     	}
			 	}); 
				
				$('#wPAmount').change(function() {
			     	var amount = $("#wPAmount").val();
			     	var f =parseFloat(amount);
			     	var wfee=f*0.006
			     	$('#wfee').html(wfee);
			     })
				
			});
		</script>
	</body>
</html>
